import React from 'react';
import styles from './index.less';
import { IRouteComponentProps } from 'umi';

interface ITeacherProps {
    url: string,
    [key: string]: any,
}
function Teachers(props: IRouteComponentProps) {
    const urls = [
        '//img.ui.cn/data/file/7/7/1/3701177.jpg?imageView/1/w/560/h/420',
        '//img.ui.cn/data/vip/1618386703',
        '//img.ui.cn/data/vip/1617882882',
        '//img.ui.cn/data/vip/1618217266',
        '//img.ui.cn/data/vip/1616411725',
        '//img.ui.cn/data/file/4/1/5/3710514.jpg?imageView/1/w/560/h/420',
        '//img.ui.cn/data/file/1/6/2/3711261.png?imageView/1/w/560/h/420',
        '//img.ui.cn/data/file/3/0/1/3712103.png?imageView/1/w/560/h/420',
    ];

    return (
        <ul className={styles.goods}>
            {urls.map(_ => <Teacher url={_} key={_}/>)}
        </ul>
    );
}

export default Teachers;

function Teacher(props: ITeacherProps) {
    
    return (
        <li>
            <div className={styles.teacher_pic}>
                <img src={props.url} alt="" />
            </div>
            <p>听别人的逆袭故事，悟自己的精彩人生</p>
        </li>
    );
}